package com.wsj;

/**
 * @description:
 * @author: wangSiJia
 * @date: Created in 2020/5/16 0:26
 * @version: v1.0
 * @modified By:wangSiJia
 */
public class Person {
    public String id;
    private String p_Name;
    private String p_Sex;
    private int p_Age;

    public Person() {
    }
    public Person(String p_Name) {
        this.p_Name = p_Name;
    }

    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }

    public String getP_Name() {
        return p_Name;
    }
    public void setP_Name(String p_Name) {
        this.p_Name = p_Name;
    }

    public String getP_Sex() {
        return p_Sex;
    }
    public void setP_Sex(String p_Sex) {
        this.p_Sex = p_Sex;
    }

    public int getP_Age() {
        return p_Age;
    }
    public void setP_Age(int p_Age) {
        this.p_Age = p_Age;
    }

    public void driveTransport(Aircraft aircraft) {
        System.out.println(p_Name+"正在使用："+"编号为"+aircraft.getId()+"的aircraft");
        aircraft.drivingMethod();
    }
    public void driveTransport(Airship airship) {
        System.out.println(p_Name+"正在使用："+"编号为"+airship.getId()+"的airship");
        airship.drivingMethod();
    }
    public void driveTransport(Automobile automobile) {
        System.out.println(p_Name+"正在使用："+"编号为"+automobile.getId()+"的automobile");
        automobile.drivingMethod();
    }
    public void driveTransport(Bicycle bicycle) {
        System.out.println(p_Name+"正在使用："+"编号为"+bicycle.getId()+"的bicycle");
        bicycle.drivingMethod();
    }
    public void driveTransport(HotAirBalloon hotAirBalloon) {
        System.out.println(p_Name+"正在使用："+"编号为"+hotAirBalloon.getId()+"的hotAirBalloon");
        hotAirBalloon.drivingMethod();
    }
    public void driveTransport(Hovercraft hovercraft) {
        System.out.println(p_Name+"正在使用："+"编号为"+hovercraft.getId()+"的hovercraft");
        hovercraft.drivingMethod();
    }
    public void driveTransport(Motorcycle motorcycle) {
        System.out.println(p_Name+"正在使用："+"编号为"+motorcycle.getId()+"的motorcycle");
        motorcycle.drivingMethod();
    }
    public void driveTransport(Ship ship) {
        System.out.println(p_Name+"正在使用："+"编号为"+ship.getId()+"的ship");
        ship.drivingMethod();
    }
    public void driveTransport(Submarine submarine) {
        System.out.println(p_Name+"正在使用："+"编号为"+submarine.getId()+"的submarine");
        submarine.drivingMethod();

    }
}
